package com.qilin.hscs.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Digits;

@Data
public class RegisterForm {

    //用户手机号
    @NotBlank(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "请输入正确的手机号")
    @Digits(integer = 11, fraction = 0)
    private String phone;

    //用户名称
    @NotBlank(message = "用户名不能为空")
    private String name;

    //密码
    @NotBlank(message = "密码不能为空")
    @Length(min = 6,max = 16,message = "密码不能小于6位或大于16位")
    private String password;

    private String verificationCode;

    @NotBlank(message = "图标不能为空")
    private String icon;
}
